function varargout = etapa4gui(varargin)
% ETAPA4GUI MATLAB code for etapa4gui.fig
%      ETAPA4GUI, by itself, creates a new ETAPA4GUI or raises the existing
%      singleton*.
%
%      H = ETAPA4GUI returns the handle to a new ETAPA4GUI or the handle to
%      the existing singleton*.
%
%      ETAPA4GUI('CALLBACK',hObject,eventData,handles,...) calls the local
%      function named CALLBACK in ETAPA4GUI.M with the given input arguments.
%
%      ETAPA4GUI('Property','Value',...) creates a new ETAPA4GUI or raises the
%      existing singleton*.  Starting from the left, property value pairs are
%      applied to the GUI before etapa4gui_OpeningFcn gets called.  An
%      unrecognized property name or invalid value makes property application
%      stop.  All inputs are passed to etapa4gui_OpeningFcn via varargin.
%
%      *See GUI Options on GUIDE's Tools menu.  Choose "GUI allows only one
%      instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES

% Edit the above text to modify the response to help etapa4gui

% Last Modified by GUIDE v2.5 04-Nov-2013 16:10:43

% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...
                   'gui_Singleton',  gui_Singleton, ...
                   'gui_OpeningFcn', @etapa4gui_OpeningFcn, ...
                   'gui_OutputFcn',  @etapa4gui_OutputFcn, ...
                   'gui_LayoutFcn',  [] , ...
                   'gui_Callback',   []);
if nargin && ischar(varargin{1})
    gui_State.gui_Callback = str2func(varargin{1});
end

if nargout
    [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
    gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT


% --- Executes just before etapa4gui is made visible.
function etapa4gui_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject    handle to figure
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
% varargin   command line arguments to etapa4gui (see VARARGIN)

% Choose default command line output for etapa4gui
handles.output = hObject;

% Update handles structure
guidata(hObject, handles);

% UIWAIT makes etapa4gui wait for user response (see UIRESUME)
% uiwait(handles.figure1);


% --- Outputs from this function are returned to the command line.
function varargout = etapa4gui_OutputFcn(hObject, eventdata, handles) 
% varargout  cell array for returning output args (see VARARGOUT);
% hObject    handle to figure
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Get default command line output from handles structure
varargout{1} = handles.output;


% --- Executes on selection change in popupmenu1.
function popupmenu1_Callback(hObject, eventdata, handles)
% hObject    handle to popupmenu1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: contents = cellstr(get(hObject,'String')) returns popupmenu1 contents as cell array
%        contents{get(hObject,'Value')} returns selected item from popupmenu1


% --- Executes during object creation, after setting all properties.
function popupmenu1_CreateFcn(hObject, eventdata, handles)
% hObject    handle to popupmenu1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: popupmenu controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end


% --- Executes on selection change in popupmenu2.
function popupmenu2_Callback(hObject, eventdata, handles)
% hObject    handle to popupmenu2 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: contents = cellstr(get(hObject,'String')) returns popupmenu2 contents as cell array
%        contents{get(hObject,'Value')} returns selected item from popupmenu2


% --- Executes during object creation, after setting all properties.
function popupmenu2_CreateFcn(hObject, eventdata, handles)
% hObject    handle to popupmenu2 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: popupmenu controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end


% --- Executes on selection change in numeroetapas.
function numeroetapas_Callback(hObject, eventdata, handles)
% hObject    handle to numeroetapas (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: contents = cellstr(get(hObject,'String')) returns numeroetapas contents as cell array
%        contents{get(hObject,'Value')} returns selected item from numeroetapas


% --- Executes during object creation, after setting all properties.
function numeroetapas_CreateFcn(hObject, eventdata, handles)
% hObject    handle to numeroetapas (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: popupmenu controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end


% --- Executes on selection change in seleccionarcelda.
function seleccionarcelda_Callback(hObject, eventdata, handles)
% hObject    handle to seleccionarcelda (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: contents = cellstr(get(hObject,'String')) returns seleccionarcelda contents as cell array
%        contents{get(hObject,'Value')} returns selected item from seleccionarcelda


% --- Executes during object creation, after setting all properties.
function seleccionarcelda_CreateFcn(hObject, eventdata, handles)
% hObject    handle to seleccionarcelda (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: popupmenu controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end


% --- Executes on button press in crearnuevacelda.
function crearnuevacelda_Callback(hObject, eventdata, handles)
% hObject    handle to crearnuevacelda (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)


% --- Executes on button press in analizarconvalores.
function analizarconvalores_Callback(hObject, eventdata, handles)
% hObject    handle to analizarconvalores (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)


% --- Executes on selection change in componentes.
function componentes_Callback(hObject, eventdata, handles)
% hObject    handle to componentes (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: contents = cellstr(get(hObject,'String')) returns componentes contents as cell array
%        contents{get(hObject,'Value')} returns selected item from componentes


% --- Executes during object creation, after setting all properties.
function componentes_CreateFcn(hObject, eventdata, handles)
% hObject    handle to componentes (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: listbox controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end


% --- Executes on button press in volver.
function volver_Callback(hObject, eventdata, handles)
% hObject    handle to volver (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)


% --- Executes on button press in exportar.
function exportar_Callback(hObject, eventdata, handles)
% hObject    handle to exportar (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)



function res1edit_Callback(hObject, eventdata, handles)
% hObject    handle to res1edit (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of res1edit as text
%        str2double(get(hObject,'String')) returns contents of res1edit as a double


% --- Executes during object creation, after setting all properties.
function res1edit_CreateFcn(hObject, eventdata, handles)
% hObject    handle to res1edit (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function res2edit_Callback(hObject, eventdata, handles)
% hObject    handle to res2edit (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of res2edit as text
%        str2double(get(hObject,'String')) returns contents of res2edit as a double


% --- Executes during object creation, after setting all properties.
function res2edit_CreateFcn(hObject, eventdata, handles)
% hObject    handle to res2edit (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function res3edit_Callback(hObject, eventdata, handles)
% hObject    handle to res3edit (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of res3edit as text
%        str2double(get(hObject,'String')) returns contents of res3edit as a double


% --- Executes during object creation, after setting all properties.
function res3edit_CreateFcn(hObject, eventdata, handles)
% hObject    handle to res3edit (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function res4edit_Callback(hObject, eventdata, handles)
% hObject    handle to res4edit (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of res4edit as text
%        str2double(get(hObject,'String')) returns contents of res4edit as a double


% --- Executes during object creation, after setting all properties.
function res4edit_CreateFcn(hObject, eventdata, handles)
% hObject    handle to res4edit (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function res5edit_Callback(hObject, eventdata, handles)
% hObject    handle to res5edit (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of res5edit as text
%        str2double(get(hObject,'String')) returns contents of res5edit as a double


% --- Executes during object creation, after setting all properties.
function res5edit_CreateFcn(hObject, eventdata, handles)
% hObject    handle to res5edit (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function cap1edit_Callback(hObject, eventdata, handles)
% hObject    handle to cap1edit (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of cap1edit as text
%        str2double(get(hObject,'String')) returns contents of cap1edit as a double


% --- Executes during object creation, after setting all properties.
function cap1edit_CreateFcn(hObject, eventdata, handles)
% hObject    handle to cap1edit (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end


% --- Executes on selection change in sensibilidades_string.
function sensibilidades_string_Callback(hObject, eventdata, handles)
% hObject    handle to sensibilidades_string (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: contents = cellstr(get(hObject,'String')) returns sensibilidades_string contents as cell array
%        contents{get(hObject,'Value')} returns selected item from sensibilidades_string


% --- Executes during object creation, after setting all properties.
function sensibilidades_string_CreateFcn(hObject, eventdata, handles)
% hObject    handle to sensibilidades_string (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: listbox controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end


% --- If Enable == 'on', executes on mouse press in 5 pixel border.
% --- Otherwise, executes on mouse press in 5 pixel border or over crearnuevacelda.
function crearnuevacelda_ButtonDownFcn(hObject, eventdata, handles)
	errordlg('Usted no es un Conejo. No esta habilitado para crear la celda',' Error '); 
% hObject    handle to crearnuevacelda (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)


% --- If Enable == 'on', executes on mouse press in 5 pixel border.
% --- Otherwise, executes on mouse press in 5 pixel border or over seleccionarcelda.
function seleccionarcelda_ButtonDownFcn(hObject, eventdata, handles)

% hObject    handle to seleccionarcelda (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
